package com.service.atf.base.type;



/**
 * User: luotao
 * Date: 12-2-29
 * Time: 19:41:00
 */
public class ResultAdderWrite{
  private int code;

  private int offsetBefore;

  private int offsetAfter;

  //当前内存块的剩余可写数量
  private int memoryRemain;
  //当前文件的剩余可写数量
  private int fileRemain;

  private int lenStart =55;

  private int lenEne = 65;



  public ResultAdderWrite(int code){
    this.code=code;
  }

  public ResultAdderWrite(){
  }

  public int getCode(){
    return code;
  }

  public void setCode(int code){
    this.code=code;
  }



  public int getLenStart(){
    return lenStart;
  }

  public void setLenStart(int lenStart){
    this.lenStart=lenStart;
  }

  public int getLenEne(){
    return lenEne;
  }

  public void setLenEne(int lenEne){
    this.lenEne=lenEne;
  }

  public int getMemoryRemain(){
    return memoryRemain;
  }

  public void setMemoryRemain(int memoryRemain){
    this.memoryRemain=memoryRemain;
  }

  public int getFileRemain(){
    return fileRemain;
  }

  public void setFileRemain(int fileRemain){
    this.fileRemain=fileRemain;
  }

  public int getOffsetBefore(){
    return offsetBefore;
  }

  public void setOffsetBefore(int offsetBefore){
    this.offsetBefore=offsetBefore;
  }

  public int getOffsetAfter(){
    return offsetAfter;
  }

  public void setOffsetAfter(int offsetAfter){
    this.offsetAfter=offsetAfter;
  }


  @Override
  public String toString() {
    StringBuffer str = new StringBuffer();
    str.append("写入结果 : "+code+"  写入数据长度 : "+(offsetAfter-offsetBefore)+"  写入前偏移量 : "
        +offsetBefore+"  写入后偏移量 : " +offsetAfter+"  内存块剩余空间 : "+memoryRemain
        +"  文件剩余空间 : "+fileRemain);
    return str.toString();
  }
}
